package com.hongdee.market.grievance.mapper;

import com.hongdee.market.grievance.pojo.TMarketWhineApprovalPojo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.Update;

/**
 * Created by Liu XiaoLong
 * Date: 2017/10/31.
 * Remark:
 */
@Mapper
public interface ITMarketWhineApprovalMapper {
    /**
     * 更新实体
     */
    @Update("update t_market_cost_tag set whine_id= #{whineId},approval_people = #{approvalPeople} ,approval_time = #{approvalTime}," +
            "approval_content=#{approvalContent},status = #{status} where id = #{id}")
    void UpdatePoJo(TMarketWhineApprovalPojo tMarketWhineApprovalPojo);

    @Insert("insert into t_market_whine_approval (id,whine_id,approval_people,approval_time,approval_content,status)values(#{id}," +
            "#{whineId},#{approvalPeople},#{approvalTime},#{approvalContent},#{status})")
    //@SelectKey(statement = "select  replace(uuid(),'-','')   from dual", keyProperty = "id", before = true, resultType = String.class)
    void Insert(TMarketWhineApprovalPojo tMarketWhineApprovalPojo);
}
